Compute spatial average of sediment variables
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=short), | intent(in) | :: | dt |
time step (s) |
||
| type(grid_real), | intent(in) | :: | erosion |
interril sediment detachment rate (kg/s) |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=short), | public | :: | c | ||||
| integer(kind=short), | public | :: | count | ||||
| integer(kind=short), | public | :: | i | ||||
| real(kind=float), | public | :: | icearea | ||||
| integer(kind=short), | public | :: | r |
SUBROUTINE ComputeSpatialAverageSediment & ! (dt, erosion) IMPLICIT NONE !arguments with intent in: INTEGER (KIND = short), INTENT(IN) :: dt !!time step (s) TYPE (grid_real), INTENT(IN) :: erosion !! interril sediment detachment rate (kg/s) !local declarations INTEGER (KIND = short) :: i, r, c INTEGER (KIND = short) :: count REAL (KIND = float) :: icearea ![m2] !-------------------------------end of declaration----------------------------- DO i = 1, nextents count = 0 !erosion (interril sediment detachment) IF ( sedimentout (1) ) THEN count = count + 1 extents (i) % sediment (count) = & GetMean (erosion, maskInteger = extents (i) % mask ) * dt !conversion to kg over dt END IF END DO RETURN END SUBROUTINE ComputeSpatialAverageSediment